export default {
  state: () => ({
    searchRepoStr: "*",
    includePath: "",
    excludePath: "",
    allRepos: [],
  }),
  mutations: {
    selectMultRepe: (state, searchRepoList) => {
      if (Array.isArray(searchRepoList) && searchRepoList.length !== 0) {
        state.searchRepoStr = searchRepoList.join(",");
      } else {
        state.searchRepoStr = "*";
      }
    },
    addIncluedPath: (state, includePath) => {
      state.includePath = includePath;
    },
    addExcludePath: (state, excludePath) => {
      state.excludePath = excludePath;
    },
    addAllRepos: (state, allRepos) => {
      state.allRepos = allRepos;
    },
  },
};
